// ViewDayDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
//
const int MAX_ROOTS = 10;

struct EventSettings {
	EventSettings() {	// default constructor
		m_notes = "";
		m_monitoring = true;
	}
	EventSettings(CString &notes, int monitoring) :
		m_notes(notes), m_monitoring(monitoring) {};

	CString m_notes;
	int m_monitoring;
};

/////////////////////////////////////////////////////////////////////////////
// CViewDayDlg dialog
class CViewDayDlg : public CDialog
{
// Construction
public:
	CViewDayDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CViewDayDlg)
	enum { IDD = IDD_VIEW_DAYINFO };
	CButton	m_grpSettings;
	CButton	m_btnMonitoring;
	CButton	m_btnNewCat;
	CButton	m_btnAdd;
	CEdit	m_eNotes;
	CTreeCtrl	m_EventTree;
	CButton	m_btnDelete;
	CString	m_szInformation;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CViewDayDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CViewDayDlg)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnAddEvent();
	afx_msg void OnDeleteEvent();
	afx_msg void OnEndlabeleditEventTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKillfocusInformation();
	afx_msg void OnSelchangedEventTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRclickEventTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnNewCat();
	afx_msg void OnCut();
	afx_msg void OnCopy();
	afx_msg void OnPaste();
	afx_msg void OnBeginlabeleditEventTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnCheckMonitoring();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	void EnableSettings( bool enable = TRUE );
	HTREEITEM AddEvent(CString name, CString notes);
	CString m_add_event_name;
	BOOL InsertStringIntoClipboard(void);
	void GetPreviousRoot( CString &str );
	UINT m_uiEventsNumber;
	BOOL EventListModified(HTREEITEM hti);
	BOOL IsStaticItem( HTREEITEM hti);
//	HTREEITEM m_htiOther;
//	HTREEITEM m_htiMain;
	CImageList m_checkImageList;
//	int ObtainSelectedItem();
//	int m_iOldSelectedEvent;
//	void OnChangeEventSelection(int iEvent);
//	int m_iSelectedEvent;

//	ttt m_hms;
//	CMap<HANDLE, HANDLE, CString, CString&> m_sms;//, m_rootVsCategory;

	CMap<HANDLE, HANDLE, EventSettings, EventSettings&> m_sms;//, m_rootVsCategory;
	
	HTREEITEM m_htiroot[MAX_ROOTS],
			m_htiroot_first,
			m_htiroot_last;
	int m_roots_number;

	CategoryArray catar;
//	CMap<CViewDayDlg, &CViewDayDlg, CString, &CString> m_hms;
};



/////////////////////////////////////////////////////////////////////////////
